<?php

//链接数据库
	$data = new mysqli('127.0.0.1','root','','friday');
    $phone = $_POST['phone']; 
//	$psw = $_POST['psw'];
	//设置中文
	mysqli_query($data,"SET NAMES utf8");
	//设置查询语句
	$dbusername=null;
	$dbpassword=null;
	$sql="select * from zhanghao where phone ='{$phone}'";
	
	//执行
    //执行sql语句
	if($query = mysqli_query($data, $sql)){
		while ($row=mysqli_fetch_assoc($query)) {  
//          $dbusername=$row["phone"];  
            $dbpassword=$row["pas"];  
			
        }
		echo $dbpassword;
	}
	mysqli_close($data);
?>